/**
 * 
 */
package com.jd.event;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author luolishu
 * 
 */
public class ScheduledEventListener implements EventListener {
	ExecutorService threadPool = Executors.newFixedThreadPool(5);

	@Override
	public void listen(Event<?> event) {
		Callable<?> callable = (Callable<?>) event.getObject();
		threadPool.submit(callable);
	}

}
